<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body>
<div>
    <table>
        <form id="form-orderItemTmp-edit" th:object="${orderItemTmp}" >
            <input name="orderItemId"  type="hidden"  th:field="*{orderItemId}" />
            <div class="row">
                <div class="col-sm-8 col-sm-offset-2">
                    <h4 class="form-header h4 ">快递信息</h4>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-4 col-sm-offset-2">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>快递公司：</label>
                        <div class="col-sm-8">

                            <select name="expressCompanyId" class="form-control"
                                    th:with="type=${@expressC.listExpressCompanys()}" th:field="*{expressCompanyId}">
                                <option th:each="ec : ${type}" th:text="${ec.expressCompanyName}" th:value="${ec.expressCompanyId}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>快递单号：</label>
                        <div class="col-sm-8">
                            <input name="expressNo" autocomplete="off"  th:field="*{expressNo}" class="form-control" type="text" maxlength="20" required>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-8 col-sm-offset-2">
                    <h4 class="form-header h4">包裹信息</h4>
                </div>
            </div>
            <div class="row" style="margin-bottom: 10px;">
                <div class="col-sm-4 col-sm-offset-2">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>物品名称：</label>
                    <div class="col-sm-8">
                        <input name="goodsName" autocomplete="off" th:field="*{goodsName}" class="form-control" type="text" maxlength="80" required>
                    </div>
                </div>
                <div class="col-sm-4">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>物品数量：</label>
                    <div class="col-sm-8">
                        <input name="qty" autocomplete="off"  th:field="*{qty}" class="form-control" type="text"  required>
                    </div>
                </div>
            </div>

            <div class="row" style="margin-bottom: 10px;">
                <div class="col-sm-4 col-sm-offset-2">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>申报价值：</label>
                    <div class="col-sm-8">
                        <input name="declaredValue" autocomplete="off"  th:field="*{declaredValue}" class="form-control" type="text" maxlength="80" required>
                    </div>
                </div>
            </div>
            <div class="row " style="margin-bottom: 10px;">
                <div class="col-sm-4 col-sm-offset-2">
                    <label class="col-sm-4 control-label"></span>备注：</label>
                    <div class="col-sm-8">
                        <textarea name="remark" th:field="*{remark}"  id="remark" cols="100" rows="5"></textarea>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-offset-5 col-sm-10">
                    <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>修 改</button>&nbsp;
                    <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
                </div>
            </div>
        </form>
    </table>
    <div th:include="include::footer"></div>
    <script>
        var prefix = ctx + "transaction/order";

        $("#form-orderItem-add").validate({

            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                var data = $("#form-orderItemTmp-edit").serializeArray();
                $.operate.saveTab(prefix + "/editOrderItemTmp", data);

            }
        }
    </script>

</div>

</body>
</html>
